﻿@model shop.DanhMuc

@{
    ViewBag.Title = "Edit";
    }
<div id="content">
    <div id="content-header">
        <div id="breadcrumb">
            <a href="index.html" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a>
            <a href="#" class="tip-bottom">Form elements</a>
            <a href="#" class="current">Common elements</a>
        </div>    
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <div class="widget-box">
                    <div class="widget-title">
                        <span class="icon">
                            <i class="icon-align-justify"></i>
                        </span>
                        <h5>Thêm sản phẩm</h5>
                    </div>
                    <div class="widget-content nopadding">
                        @using (Html.BeginForm("edit", "DanhMuc", FormMethod.Post, new { enctype = "multipart/form-data", @id = "formdanhmuc", @class = "form-horizontal" }))
                        {@Html.AntiForgeryToken()
                           @Html.HiddenFor(model => model.ID)
                             <div class="control-group">
                                <label class="control-label">Tên danh mục :</label>
                                <div class="controls">
                                    <input type="text" value="@Model.DanhMuc1" class="required span3" name="DanhMuc1" placeholder="Nhập tên danh mục" />
                                </div>
                            </div>
                             <input type="hidden" hidden="hidden" name="MaDM" value="@Model.MaDM" />
                              <input type="hidden" hidden="hidden" name="IDCha" value="@Model.IDCha" />
                            <div class="control-group">
                                <label class="control-label">Danh Mục cha</label>
                                <div class="controls">
                                   @Html.Action("selectDM", "Partial", new { type = "2", IDCon = Model.IDCon })
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Danh mục cha:</label>
                                <div class="controls">
                                   @if(Model.Cha==true )
                                   {
                                    <label><input type="radio" name="Cha" value="" />Không sét</label>
                                    <label><input checked="checked" type="radio" name="Cha" value="true" />có</label>
                                    <label><input type="radio" name="Cha" value="false" />Không</label>   
                                   }
                                   else
                                   {
                                       if(Model.Cha==false )
                                       {
                                         <label><input type="radio" name="Cha" value="" />Không sét</label>
                                        <label><input  type="radio" name="Cha" value="true" />có</label>
                                         <label><input checked="checked" type="radio" name="Cha" value="false" />Không</label>   
                                       }
                                       else
                                       {
                                         <label><input checked="checked" type="radio" name="Cha" value="" />Không sét</label>
                                        <label><input  type="radio" name="Cha" value="true" />có</label>
                                         <label><input  type="radio" name="Cha" value="false" />Không</label>   
                                       }
                                   }
                                    
                                </div>
                            </div>
                            <div class="form-actions">
                                <button id="them" type="submit" class="btn btn-success">Sửa</button>
                            </div>
                        }

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div id="footer" class="span12"> 2012 &copy; Marutii Admin. Brought to you by <a href="http://themedesigner.in">Themedesigner.in</a> </div>
</div>
<script src="~/Content/themes/maruti/js/jquery.min.js"></script>
<script src="~/Content/themes/maruti/js/jquery.ui.custom.js"></script>
<script src="~/Content/themes/maruti/js/bootstrap.min.js"></script>
<script src="~/Content/themes/maruti/js/bootstrap-colorpicker.js"></script>
<script src="~/Content/themes/maruti/js/bootstrap-datepicker.js"></script>
<script src="~/Content/themes/maruti/js/jquery.uniform.js"></script>
<script src="~/Content/themes/maruti/js/select2.min.js"></script>
<script src="~/Content/themes/maruti/js/maruti.js"></script>
<script src="~/Content/themes/maruti/js/maruti.form_common.js"></script>
<script src="~/Plugin/ckeditor/ckeditor.js"></script>
<script src="~/Content/js/jquery.validate.js"></script>
<script src="~/Content/js/localization/messages_vi.js"></script>